package org.prem.collection;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

public class TreeMapSample {
	
	public static void main(String[] args){
		TreeMap tm = new TreeMap();
		tm.put("Prem", new Double("10"));
		tm.put("HTC", new Double("10"));
		tm.put("KEC", new Double("10"));
		
		Set set = tm.entrySet();
		Iterator i = set.iterator();
		while(i.hasNext()){
			Map.Entry map = (Map.Entry)i.next();
			System.out.println("Key Value------>"+map.getKey()+": "+map.getValue());
		}
	}

}
